package com.jzlin.funhub.admin.model.resp;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jzlin.funhub.admin.model.dto.ArticleTagDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 文章详情.
 *
 * @author linjz
 * @since 2025/7/24
 */
@Data
@ApiModel
public class ArticleDetailResp {
    @ApiModelProperty("文章id")
    private Long id;

    @ApiModelProperty("文章标题")
    private String title;

    @ApiModelProperty("文章内容")
    private String content;

    @ApiModelProperty("作者ID，关联用户表")
    private Long authorId;

    @ApiModelProperty("作者名称")
    private String authorName;

    @ApiModelProperty("作者头像")
    private String authorAvatar;

    @ApiModelProperty("分类ID，关联分类表")
    private Long categoryId;

    @ApiModelProperty("分类名称")
    private String categoryName;

    @ApiModelProperty("文章状态")
    private Integer status;

    @ApiModelProperty("阅读量")
    private Integer viewCount;

    @ApiModelProperty("评论数")
    private Integer commentCount;

    @ApiModelProperty("点赞数")
    private Integer starCount;

    @ApiModelProperty("发布时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date publishedTime;

    @ApiModelProperty("用户是否已收藏")
    private Boolean hasStar;

    @ApiModelProperty("标签列表")
    private List<ArticleTagDTO> tags;
}
